package com.gitee.cui.basic.create;

import com.gitee.cui.util.ThreadUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * 一个空线程的测试示例
 * @author cuiqingqiang
 * @version 1.0
 * @date 2021/11/9 8:50
 **/
@Slf4j
public class EmptyThread {
    public static void main(String[] args) {
        Thread thread = new Thread("测试空线程");
        log.info("线程名称：{}", thread.getName());
        log.info("线程id：{}", thread.getId());
        log.info("线程状态：{}", thread.getState());
        log.info("线程优先级：{}", thread.getPriority());
        thread.start();
        log.info("线程状态：{}", thread.getState());
        ThreadUtil.sleepMilliSeconds(100);
    }
}
